home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC]
/
NeXTSTEP 3.3 Dev Intel.iso
/
usr
/
sybase
/
doc
/
dbchange.man
< prev
next >
Wrap
Text File
|
1993-04-22
|
2KB
|
67 lines
1 Version 4.0 -- 5/1/89 dbchange
______________________________________________________________________
NAME: dbchange
FUNCTION:
Determine whether a command batch has changed the current data-
base.
SYNTAX:
char *dbchange(dbproc)
DBPROCESS *dbproc;
COMMENTS:
dbchange Version 4.0 -- 5/1/89 2
______________________________________________________________________
o dbchange() informs the program of a change in the current data-
base. It does so by catching any instance of the Transact-SQL
USE command.
o Although a USE command can appear anywhere in a command batch,
the database change does not actually take effect until the end
of the batch. dbchange() is therefore useful only in determin-
ing whether the current command batch has changed the database
for subsequent command batches.
o The internal DBPROCESS flag that dbchange() monitors to deter-
mine whether the database has changed is cleared when the pro-
gram executes a new command batch by calling either dbsqlexec()
or dbsqlsend(). Therefore, the simplest way to keep track of
database changes is to call dbchange() when dbresults() returns
NO_MORE_RESULTS at the end of each command batch.
o Alternatively, you can always get the name of the current
3 Version 4.0 -- 5/1/89 dbchange
______________________________________________________________________
database by calling dbname().
PARAMETERS:
dbproc - A pointer to the DBPROCESS structure that provides the
connection for a particular front-end/SQL Server process. It
contains all the information that DB-Library uses to manage
communications and data between the front end and SQL Server.
RETURNS:
A pointer to the null-terminated name of the new database, if
any. If the database has not changed, NULL will be returned.
SEE ALSO:
dbname, dbresults, dbsqlexec, dbsqlsend, dbuse